<template>
  <baidu-map class="bm-view" :center="center" :zoom="15" :double-click-zoom="false" :scroll-wheel-zoom="true" @dblclick="selectPoint"
    ak="6GsLWO6HaqjRb3BuCjqCHIP1tMEuMkWK">
  </baidu-map>
</template>

<script>
import BaiduMap from 'vue-baidu-map/components/map/Map.vue'
export default {
  name: 'ZmMap',
  props: {
    center: {
      type: [String, Object],
      default: () => {
        return {lng: 116.404, lat: 39.915}   
      },
    }     
  },
  components: {
    BaiduMap
  },
  methods: {
    selectPoint(type) {
      this.$emit('selectPoint',type.point)
    }
  },
}
</script>

<style>
.bm-view {
  width: 100%;
  height: 500px;
}
</style>